package big;

import java.math.BigInteger;

public class BigIntegerDemo {

    public static void main(String[] args) {
        BigInteger num1 = new BigInteger("12345679");
        BigInteger num2 = new BigInteger("97654321");

        BigInteger result = num1.add(num2);//实现加法
        System.out.println(result);
        result = num2.subtract(num1);//实现减法
        System.out.println(result);
        result = num1.multiply(num2);//实现乘法
        System.out.println(result);
        result = result.divide(num1);//实现除法
        System.out.println(result);
    }
}
